package com.zhang.mapper;

import com.zhang.entity.ShoppingCar;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ZhangD
 * @since 2021-07-13
 */
@Mapper
public interface ShoppingCarMapper extends BaseMapper<ShoppingCar> {

    @Delete("delete from shopping_car where product_id=#{pid}")
    void delete(@Param("pid") String pid);

    @Delete("delete from shopping_car where user_id=#{uid}")
    void deleteAll(@Param("uid") String uid);

}
